#!/usr/bin/perl
#
# Plot a statistic from the database
#
# param 1 = statistic
# param 2 = qualifier
#
use Counter;

my $stats = Counter::openfile("statistics");

my $statistic = shift;
my $qualifier = shift;
my @statlist = $stats->select("name=? AND qualifier=? ORDER BY date",
			      $statistic, $qualifier);
for $stat (@statlist) {
    print "$stat->{date}\t$stat->{value}\n";
}

